
import React, { Component } from 'react'

import PropTypes from 'prop-types'
import RXScrollView from './config/FormScrollView'
import FormHOC from './core/FormHOC'

class RXFormScrollView extends Component {
  constructor(props) {
    super(props)
  }

  static propTypes = {
    ...RXScrollView.propTypes,
    style: PropTypes.any,
  }

  static defaultProps = {
    ...RXScrollView.defaultProps,
    style: {}
  }

  render() {
    const { children, style, ...others } = this.props
    return (
      <RXScrollView
        scrollEventThrottle={30}
        style={[{ flex: 1 }, style]} {...others}
      >
        {children}
      </RXScrollView>
    )
  }
}

export default FormHOC(RXFormScrollView)